package objects

import(
	"net/http"
)

/**
 * 处理objcts的请求，支持get获取，支持post提交，其他的默认返回不支持
 */
func Handler(w http.ResponseWriter, r *http.Request)  {
	method := r.Method
	if method == http.MethodGet {
		 get(w,r)
		return
	}
	if method == http.MethodPut {
		put(w,r)
		return
	}
	w.WriteHeader(http.StatusMethodNotAllowed)
}
